<template>
  <div>
    首页
    <el-button @click="btnClick1">成功</el-button>
    <el-button @click="btnClick2">警告</el-button>
    <el-button @click="btnClick3">消息</el-button>
    <el-button @click="btnClick4">错误</el-button>
  </div>
</template>
<script>
// import { Message } from 'element-ui' // Message===this.$message
export default {
  methods: {
    btnClick1() {
      // this.$message({
      //   message: '成功',
      //   type: 'success'
      // })
      this.$message.success('成功')
    },
    btnClick2() {
      this.$message.warning('警告')
    },
    btnClick3() {
      this.$message('消息')
      // this.$message.info('消息')
    },
    btnClick4() {
      this.$message.error('错误')
    }
  }
}
</script>
<style>
</style>
